package com.roadjava.GDOUGym.service.impl;

import com.roadjava.GDOUGym.bean.dto.GameDTO;
import com.roadjava.GDOUGym.bean.entity.GameDO;
import com.roadjava.GDOUGym.bean.entity.GameEquipmentDO;
import com.roadjava.GDOUGym.bean.res.ResultDTO;
import com.roadjava.GDOUGym.convert.GameConvert;
import com.roadjava.GDOUGym.mapper.GameEquipmentMapper;
import com.roadjava.GDOUGym.mapper.GameMapper;
import com.roadjava.GDOUGym.service.GameEquipmentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
@Slf4j
public class GameEquipmentServiceImpl implements GameEquipmentService {
    @Resource
    private GameEquipmentMapper gameEquipmentMapper;

    @Override
    public ResultDTO<String> addEquipment(GameEquipmentDO gameEquipmentDO) {

        int result = gameEquipmentMapper.add(gameEquipmentDO);
        if (result == 1) {
            return ResultDTO.buildSuccess("添加成功");
        }else {
            return ResultDTO.buildSuccess("添加失败");
        }
    }

}
